import React, { Component } from 'react'
import eventBus from '../utils/event-bus'

export default class HomeBanner extends Component {
  prevClick() {
    eventBus.emit('bannerPrev', 'prev', 20, 1.88)
  }

  nextClick() {
    eventBus.emit('bannerNext', {name: 'next', age: 18, height: 1.68})
  }
  
  render() {
    return (
      <div>
        <button onClick={e => this.prevClick()}>上一个</button>
        <button onClick={e => this.nextClick()}>下一个</button>
      </div>
    )
  }
}
